﻿@*@{                      
    string activeUserClass = "activeUser";
    if (WebSecurity.IsAuthenticated)
    {
        activeUserClass = "InActiveUser";
        BookContent.AppUser user = BookContent.Book.Keeper.GetAppUser(WebSecurity.CurrentUserName);
        if (user != null)
        {
            if (user.InWorkflow <= (int)BookContent.UserInWorkflowStatus.InActiveUser)
            {
    <div class="@activeUserClass">

        @using (Html.BeginForm("SendMail", "Account", FormMethod.Post, new { id = "sendMail" }))
        {
            @Html.AntiForgeryToken()
            <span>You are not activated your email,  @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })! 
                   You can  <a href="javascript:document.getElementById('sendMail').submit()">Send Mail to Yourself </a>to activate your membership.
            </span>
           
        }
    </div>
            }
            else
            {
    <div style="display: none">
        You are activated on @BookContent.Book.Keeper.SimpleDeCode(user.Secret)
    </div>
            }
        }
        else
        {
    <div class="@activeUserClass">
        @using (Html.BeginForm("OldUser", "Account", FormMethod.Post, new { name = "frmOldUser" }))
        { 
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)
            <div>
                You are not activated your email, Please update your email address.
            <br />
                <input type="email" id="userEmail" name="userEmail" /><input type="submit" id="btnAppUser" value="Update Email" />
            </div>
        }
    </div> 
        }
    }
}*@